package cn.virens.common.mybatis.service.dubbo.consumer;


import cn.virens.common.mybatis.entity.BaseModel;
import cn.virens.common.mybatis.service.dubbo.BaseWriteProvider;
import cn.virens.common.util.exception.APIException;

import java.io.Serializable;

public abstract class BaseWriteConsumerImpl<S extends BaseWriteProvider<T>, T extends BaseModel> extends BaseReadConsumerImpl<S, T> implements BaseWriteProvider<T> {

    @Override
    public T insert(T record) throws APIException {
        return baseProvider().insert(record);
    }

    @Override
    public T update(T record) throws APIException {
        return baseProvider().update(record);
    }

    @Override
    public int delete(Serializable id) throws APIException {
        return baseProvider().delete(id);
    }

}
